package studyTest;

public class Dog {
    public String name;//名字
    public int age;//年龄
    public String color;//毛色

    //狗的行为
    public void bark(){
        System.out.println(name+"汪汪汪！！");
    }

    public static void main(String[] args) {
        Dog dog1=new Dog();
        Dog dog2=new Dog();
        dog1.name="小黄";
        dog1.age=5;
        dog1.color="yellow";
        dog1.bark();
        dog2.name="大黑";
        dog2.age=2;
        dog2.color="black";
        dog2.bark();
    }
}
